package cn.bonoon.handler.impl;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import cn.bonoon.core.info.BnSessionContext;

public class SessionListener implements HttpSessionListener {

	public static Map userMap = new HashMap();
	private BnSessionContext sc = BnSessionContext.getInstance();

	@Override
	public void sessionCreated(HttpSessionEvent se) {
		sc.AddSession(se.getSession());
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent se) {
		HttpSession session = se.getSession();
		sc.DelSession(session);
	}

}
